import fetch from '@/store/api/fetch'

export  const page = (uri: string, params: { [name: string]: any }) => fetch.get(`${uri}/page`, { params })

export const dic = (uri: string) => fetch.get(`${uri}/dic`)

export const info = (uri: string, id: string) => fetch.get(`${uri}/${id}/info`)

export const create = (uri: string, data: any, ) => fetch.post(`${uri}`, data)

export const modify = (uri: string, data: any) => fetch.post(`${uri}`, data)

export const search = (uri: string, params: {[name: string]:any}) => fetch.get(`${uri}`, {params})